#include <iostream>
using namespace std;

int main() {
    int a;
    cin >> a;
    string res;
    if (a == 1 || a == 3 || a == 5) {
        res = "NO";
    } else {
        res = "YES";
    }
    if (a < 1 || a > 7) {
        res = "NO";
    }
    cout << res;
    
    return 0;
}